MODE_INDEX
MODE_INDEX = 1
Interface class for accessing Roundcube messages cache
$imap : \rcube_imap
Instance of rcube_imap
$db : \rcube_db
Instance of rcube_db
$userid : int
User ID
$ttl : int
Expiration time in seconds
$threshold : int
Maximum cached message size
$icache : array
Internal (in-memory) cache
__construct(\rcube_db $db, \rcube_imap $imap, int $userid, bool $skip_deleted, string $ttl, int $threshold) : mixed
Object constructor.
\rcube_db | $db | DB handler |
\rcube_imap | $imap | IMAP handler |
int | $userid | User identifier |
bool | $skip_deleted | skip_deleted flag |
string | $ttl | Expiration time of memcache/apc items |
int | $threshold | Maximum cached message size |
get_index(string $mailbox, string $sort_field = null, string $sort_order = null, mixed $existing = false) : array
Return (sorted) messages index (UIDs).
If index doesn't exist or is invalid, will be updated.
string | $mailbox | Folder name |
string | $sort_field | Sorting column |
string | $sort_order | Sorting order (ASC|DESC) |
mixed | $existing |
Messages index
get_message(string $mailbox, int $uid, bool $update = true, mixed $cache = true) : \rcube_message_header
Returns message data.
string | $mailbox | Folder name |
int | $uid | Message UID |
bool | $update | If message doesn't exists in cache it will be fetched from IMAP server |
mixed | $cache |
Message data
change_flag(string $mailbox, array $uids, string $flag, bool $enabled = false) : mixed
Sets the flag for specified message.
string | $mailbox | Folder name |
array | $uids | Message UIDs or null to change flag of all messages in a folder |
string | $flag | The name of the flag |
bool | $enabled | Flag state |
add_index_row(mixed $mailbox, mixed $sort_field, mixed $data, mixed $mbox_data = [], mixed $exists = false, mixed $modseq = null) : mixed
Saves index data into database
mixed | $mailbox | |
mixed | $sort_field | |
mixed | $data | |
mixed | $mbox_data | |
mixed | $exists | |
mixed | $modseq |